package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.OrderPackageMapper;
import com.qj.yantaishan.domain.OrderPackage;
import com.qj.yantaishan.service.IOrderPackageService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 订单包裹Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class OrderPackageServiceImpl    extends ServiceImpl<OrderPackageMapper, OrderPackage>  implements IOrderPackageService
{
    @Autowired
    private OrderPackageMapper orderPackageMapper;

    /**
     * 查询订单包裹
     * 
     * @param packageId 订单包裹主键
     * @return 订单包裹
     */
    @Override
    public OrderPackage selectOrderPackageByPackageId(Long packageId)
    {
        return orderPackageMapper.selectOrderPackageByPackageId(packageId);
    }

    /**
     * 查询订单包裹列表
     * 
     * @param orderPackage 订单包裹
     * @return 订单包裹
     */
    @Override
    public List<OrderPackage> selectOrderPackageList(OrderPackage orderPackage)
    {
        return orderPackageMapper.selectOrderPackageList(orderPackage);
    }

    /**
     * 新增订单包裹
     * 
     * @param orderPackage 订单包裹
     * @return 结果
     */
    @Override
    public int insertOrderPackage(OrderPackage orderPackage)
    {
        return orderPackageMapper.insertOrderPackage(orderPackage);
    }

    /**
     * 修改订单包裹
     * 
     * @param orderPackage 订单包裹
     * @return 结果
     */
    @Override
    public int updateOrderPackage(OrderPackage orderPackage)
    {
        return orderPackageMapper.updateOrderPackage(orderPackage);
    }

    /**
     * 批量删除订单包裹
     * 
     * @param packageIds 需要删除的订单包裹主键
     * @return 结果
     */
    @Override
    public int deleteOrderPackageByPackageIds(String packageIds)
    {
        return orderPackageMapper.deleteOrderPackageByPackageIds(Convert.toStrArray(packageIds));
    }

    /**
     * 删除订单包裹信息
     * 
     * @param packageId 订单包裹主键
     * @return 结果
     */
    @Override
    public int deleteOrderPackageByPackageId(Long packageId)
    {
        return orderPackageMapper.deleteOrderPackageByPackageId(packageId);
    }
}
